package edu.metrostate.capstonediner;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
 
public class MainMenu extends Activity{
 
    Button btnLoginT;
    Button btnOptionsT;
    Button btnStartGame;
    Button btnInAppStore;
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_menu);
 
        // Buttons
        btnLoginT = (Button) findViewById(R.id.btnLogin);
        btnOptionsT = (Button) findViewById(R.id.btnOptions);
        btnStartGame = (Button) findViewById(R.id.btnStartGame);
        btnInAppStore = (Button) findViewById(R.id.btnInAppStore);
        
     // Start Game event
        btnStartGame.setOnClickListener(new View.OnClickListener() {
 
            @Override
            public void onClick(View view) {
                // This will start Game
                Intent i = new Intent(getApplicationContext(), GameActivity.class);
                startActivity(i);
 
            }
        });
        
        // Login click event
        btnLoginT.setOnClickListener(new View.OnClickListener() {
 
            @Override
            public void onClick(View view) {
                // This will start the login screen
                Intent i = new Intent(getApplicationContext(), Login.class);
                startActivity(i);
 
            }
        });
 
        // Option click even
        btnOptionsT.setOnClickListener(new View.OnClickListener() {
 
            @Override
            public void onClick(View view) {
                //  This will start the Options screen
                Intent i = new Intent(getApplicationContext(), OptionsActivity.class);
                startActivity(i);
 
            }
        });
        
        // InAppStore
        btnInAppStore.setOnClickListener(new View.OnClickListener() {
 
            @Override
            public void onClick(View view) {
                //  This will start the InAppStore
                Intent i = new Intent(getApplicationContext(), AppStoreActivity.class);
                startActivity(i);
 
            }
        });
    }
}